﻿using wms.Pages;

namespace wms.Common
{
    class Auth
    {
        private static bool _available = false;
        public static string Name { get; set; }

        public static void Check()
        {
            while (Available == false) {
                Login win = new Login();
                bool? r = win.ShowDialog();
                if (r != null && r == true) {
                    Available = true;
                    Name = win.LoginName;
                }
            }
        }

        public static bool Available
        {
            get
            {
                return _available;
            }

            set
            {
                _available = value;
            }
        }

    }
}
